﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Mangosoft.DiceCopy.Presentation.Domain.Contracts;
using Mangosoft.DiceCopy.Presentation.Domain.JobHuntingModuleService;

namespace Mangosoft.DiceCopy.Presentation.Domain.Handlers {
    public class CreateResume {
        private readonly IResumeAgent _resumeAgent;

        public CreateResume(IResumeAgent resumeAgent) {
            _resumeAgent = resumeAgent;
        }


        public virtual void Execute(Guid jobseekerId) {
            var resume = new ResumeDTO();

            resume.Name = "Tom";
            resume.ResumeNumber = "788237423";
            resume.FirstName = "abc";
            resume.LastName = "def";
            resume.AvatarId = null;
            resume.Phone = "98844223";
            resume.Mobile = "13968574541";
            resume.ProvinceCode = 123123;
            resume.CityCode = 123254;
            resume.Address = "China 's zu";
            resume.Zip = "214000";
            resume.Gender = "M";
            resume.Birthdate = DateTime.Now;
            resume.EducationLevelCode = 258741;
            resume.YearsExperienceCode = 587458;
            resume.QQ = "123456";
            resume.Blog = "547845";
            resume.SNS1 = "147258";
            resume.SNS2 = "369852";
            resume.SNS3 = "258741";
            resume.Biography = "biography";
            resume.Tags = "abc;def";
            resume.IndustryCode = 2584741;
            resume.DesiredPosition = "IT";
            resume.PositionTypeCode = 258741;
            resume.AnnualPayCode = 259854;
            resume.PreferredLocations = "jiangsu";
            resume.WillingToTravelCode = 258741;
            resume.WillingToRelocate = false;
            resume.WillingToTelecommute = false;
            resume.CanStartCode = 258741;
            resume.FromThirdParty = false;
            resume.ResumeType = 258746;
            resume.PrivacyStatus = 5;
            resume.Integrity = 100;
            resume.JobseekerId = jobseekerId;


            resume.Educations = new List<EducationDTO>();

            resume.Educations.Add(
                new EducationDTO {
                    School = "Jiang'nan",
                    SchoolTypeCode = 12,
                    College = "kadk",
                    EducationLevelCode = 1234,
                    StartYear = "2011",
                    EndYear = "2013",
                    MajorCode = 123456,
                    Notes = "remarkable",
                    CityCode = 123123,
                    ProvinceCode = 23234
                });

            resume.Educations.Add(
                 new EducationDTO {
                     School = "Jiang'nan",
                     SchoolTypeCode = 12,
                     College = "kadk",
                     EducationLevelCode = 1234,
                     StartYear = "2011",
                     EndYear = "2013",
                     MajorCode = 123456,
                     Notes = "remarkable",
                     CityCode = 123123,
                     ProvinceCode = 23234
                 });

            _resumeAgent.CreateResume(resume);
        }







    }
}
